//
//  Player.h
//  fish
//
//  Created by 袁飞 on 12-8-28.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FObject.h"
#import "FAI.h"
struct PlayerProperty{
  int depth_;
  int net_attack_;
  int net_distance_;
  int dive_dur_;
  int money_;
};

@interface Player : FObject{
  int depth_;
  int net_attack_;
  int net_range_;
  int net_distance_;
  int dive_dur_;
  int money_;
  
  PlayerProperty property_; 
  bool firing_;
}
@property (nonatomic, readwrite) int depth;
@property (nonatomic, readwrite) int net_attack;
@property (nonatomic, readwrite) int net_range;
@property (nonatomic, readwrite) int net_distance;
@property (nonatomic, readwrite) int dive_dur;
@property (nonatomic, readwrite) PlayerProperty property;
@property (nonatomic, readwrite) bool firing;

+(Player *)sharedPlayer;
-(id)init;
-(void)load;
-(void)fireWithAngle:(CGPoint)point;
-(void)onTimer;
@end

@interface BulletAI: FAI{
  FObject *object_;
}
-(id)initWithFObject:(FObject*)obj;
-(void)onMoveEnd;
-(void)onActionEnd:(id)sender Data:(NSString*)data;
-(void)onTimer;
@end

@interface PlayerAI: FAI{
  FObject *object_;
}
-(id)initWithFObject:(FObject*)obj;
-(void)onMoveEnd;
-(void)onActionEnd:(id)sender Data:(NSString*)data;
-(void)onTimer;
@end

